Cryptography (namespace Crypt)


Assistant
Assistant()
int CreateHash(ALG_ID alg_id, const unsigned char* msg, unsigned int msgLen, unsigned char* out_hash, unsigned int hashLen)
out_hash is a buffer of size hashLen CALG_MD5: hashLen=16 CALG_SHA1: hashLen=20 CALG_SHA_256: hashLen=32 CALG_SHA_384: hashLen=48 CALG_SHA_512: hashLen=64 It returns the hash len or 0 if error. When hashLen is less than the required size, it returns the negative of the required hashLen
int Hmac(ALG_ID alg_id, unsigned char* key, unsigned int keyLen, unsigned char* msg, unsigned int msgLen, unsigned char* out_digest)
https: www.freeformatter.com/hmac-generator.html Google Microsoft
static const wchar_t* GetHmacText(unsigned int authenticationCode)
authenticationCode: WIN_HMAC_MD5, WIN_HMAC_SHA1, WIN_HMAC_SHA_256, WIN_HMAC_SHA_384, WIN_HMAC_SHA_512
~ Assistant()

Hash
HCRYPTHASH operator =(HCRYPTHASH ini)
Hash()
Hash(HCRYPTHASH ini)
bool Create(Crypt::Provider& cryptProvider, ALG_ID Algid, HCRYPTKEY hKey, DWORD flags)
bool IsValid()
operator HCRYPTHASH()
void Delete()
~ Hash()

Key
HCRYPTKEY operator =(HCRYPTKEY ini)
Key()
Key(HCRYPTKEY ini)
bool DeriveKey(Crypt::Provider& cryptProvider, ALG_ID Algid, HCRYPTHASH hBaseData, DWORD flags)
bool IsValid()
operator HCRYPTKEY()
void Delete()
~ Key()

Provider
HCRYPTPROV operator =(HCRYPTPROV ini)
Provider()
Provider(HCRYPTPROV ini)
bool AcquireContext(LPCTSTR container, LPCTSTR provider, DWORD provType, DWORD flags)
bool IsValid()
operator HCRYPTPROV()
void Delete()
~ Provider()
© Copyright 2000-2021 selo. All Rights Reserved. Jul 22 2021.